2020-2021 Sunseeker Telemetry and Lighting System
cs_ex4_XTSourcesDCOInternal.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define CS_XT1_TIMEOUT   50000
 
#define CS_XT2_TIMEOUT   0
 
#define CS_XT1_CRYSTAL_FREQUENCY   32768
 

Functions

void main (void)
 
void NMI_ISR (void)
 

Variables

uint8_t returnValue = 0
 
uint32_t clockValue
 
uint16_t status
 

Macro Definition Documentation

◆ CS_XT1_CRYSTAL_FREQUENCY

#define CS_XT1_CRYSTAL_FREQUENCY   32768

Definition at line 88 of file cs_ex4_XTSourcesDCOInternal.c.

◆ CS_XT1_TIMEOUT

#define CS_XT1_TIMEOUT   50000

This program demonstrates using an external 32kHz crystal to supply ACLK, and using a high speed crystal or resonator to supply SMCLK. SMLCK for the CPU is supplied by the internal DCO. The 32kHz crystal connects between pins Xin and Xout. The DCO clock is generated internally and calibrated from the 32kHz crystal. ACLK is brought out on pin P1.1, SMCLK is brought out on P1.0.

ACLK = XT1 = 32768Hz, SMCLK = default DCO = 32 x ACLK = 1048576Hz

An external watch crystal between XIN & XOUT is required for ACLK

         MSP430FR2311
      -----------------
 /|\ |         XIN P2.6|-
  |  |                 | 32kHz
  ---|RST     XOUT P2.7|-
     |                 |
     |                 |
     |             P1.0|-->SMCLK = 1MHz
     |             P1.1|-->ACLK = 32kHz Crystal Out
     |                 |
     |                 |

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • CS module
  • GPIO Port peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • None.

Definition at line 74 of file cs_ex4_XTSourcesDCOInternal.c.

◆ CS_XT2_TIMEOUT

#define CS_XT2_TIMEOUT   0

Definition at line 81 of file cs_ex4_XTSourcesDCOInternal.c.

Function Documentation

◆ main()

void main ( void  )

◆ NMI_ISR()

void NMI_ISR ( void  )

Definition at line 185 of file cs_ex4_XTSourcesDCOInternal.c.

References status.

Variable Documentation

◆ clockValue

uint32_t clockValue

Definition at line 102 of file cs_ex4_XTSourcesDCOInternal.c.

Referenced by main().

◆ returnValue

uint8_t returnValue = 0

Definition at line 95 of file cs_ex4_XTSourcesDCOInternal.c.

Referenced by main().

◆ status

uint16_t status

Definition at line 109 of file cs_ex4_XTSourcesDCOInternal.c.

Referenced by NMI_ISR().